package com.spring1.Lx2.controller;

import com.spring1.Lx2.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Controller
public class Controller1 {
    @Autowired
    private User user;

    public void aa(){
        for (int i=0;i<2;i++){
            System.out.println("法外狂徒-张三");
            user.setName("李四");
            System.out.println(user.getName());
        }
    }
}
